﻿@{
    ViewBag.Title = "LogisticalInfo";
}

@section scripts
{
    <script src="@Url.Content("~/Scripts/shared/share.js?v=")@ViewBag.version" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/Base/Logistical.js?v=")@ViewBag.version" type="text/javascript"></script>
    <link href="~/Scripts/miniui/themes/default/medium-mode.css" rel="stylesheet" type="text/css" />
}

<form id="form1" method="post">
    @Html.Partial("~/Views/Modular/Toolbars.cshtml")
    <div name="Base" title="物流资料" style="height: 100%; overflow: hidden; margin-top: 20px; margin-left: 50px">
        <div>
            模版编码:
            <input id="FNumber" name="FNumber" class="mini-textbox" showbutton="false" required="true"
                changeonmousewheel="false" style="width: 80px;" tabindex="2" />
            模版名称:
            <input id="FName" name="FName" class="mini-textbox" showbutton="false" required="true"
                changeonmousewheel="false" style="width: 160px;" tabindex="2" />  
            运费方式:
            <input id="FIsPinkage" name ="FIsPinkage" class="mini-combobox" style="width:100px;" 
            showNullItem="false"  allowInput="false" value="0" align="left" onvaluechanged="onsPinkageChanged" data ="dIsPinkage"/>  
        </div>
        <div style="height: 20px;"></div>
        <div id="BA1">
            <div id="FCalculateType" name="FCalculateType" style="display: inline-block; vertical-align: middle; margin-left: 0px;" 
                class="mini-radiobuttonlist" repeatitems="1" repeatlayout="table" repeatdirection="vertical" onvaluechanged="selectType"
                textfield="text" valuefield="id" value="0"
                url="/Logistical/GetCalculateManner">
            </div>
        </div>
        <div id="BA2" style="height: 20px;"></div>
        <div id="BA3">
            默认运费<input id="FBaseQty" name="FBaseQty" class="mini-spinner" minvalue="0" maxvalue="9999999" showbutton="false" required="true"
                changeonmousewheel="false" style="width: 80px;" tabindex="2" /><span id="sp1">件</span>内<input id="FFreight" name="FFreight" class="mini-spinner" minvalue="0" maxvalue="9999999" showbutton="false" required="true"
                    changeonmousewheel="false" style="width: 80px;" tabindex="2" />元，每增加<input id="FOthQty" name="FOthQty" class="mini-spinner" minvalue="1" maxvalue="9999999" showbutton="false" required="true"
                        changeonmousewheel="false" style="width: 80px;" tabindex="2" /><span id="sp3">件</span>，增加运费<input id="FOthMoney" name="FOthMoney" class="mini-spinner" minvalue="0" maxvalue="9999999" showbutton="false" required="true"
                            changeonmousewheel="false" style="width: 80px;" tabindex="2" />元
        </div>
        <div style="height: 20px;"></div>
        <div id="BA4">
            订单不满<input id="FMin" name="FMin" class="mini-spinner" minvalue="0" maxvalue="9999999" showbutton="false" required="true"
                changeonmousewheel="false" style="width: 80px;" tabindex="2" />元，需要基础运费
            <input id="FMax" name="FMax" class="mini-spinner" minvalue="0" maxvalue="9999999" showbutton="false" required="true"
                changeonmousewheel="false" style="width: 80px;" tabindex="2" />元  

            @*<p style="display: inline-block; color: red;">(该规则只对包邮商品有效)</p>*@
        </div>
        <div style="height: 20px;"></div>
        <div>
            送货方式：
            <input id="comLogistType" name ="FLogistType" class="mini-combobox" style="width:125px;" 
                showNullItem="false" required="true" value="1" allowInput="false" align="left" data ="dLogistType"/>  
            备注:
            <input id="FRemark" name="FRemark" class="mini-textbox " style="width: 280px;" tabindex="6" />
        </div>
    </div>
    <input name="FItemID" class="mini-hidden" />
</form>
<script>
    var dLogistType = [{ "id": "1", "text": "送货上门" },
                     { "id": "2", "text": "到店自提" }]

    var dIsPinkage = [{ "id": "0", "text": "不包邮" },
                     { "id": "1", "text": "满额包邮" }]

    mini.parse();
    //onsPinkageChanged();
    function onsPinkageChanged() {
        var mID = mini.getbyName("FIsPinkage").getValue()
        $("#BA1").hide();
        $("#BA2").hide();
        $("#BA3").hide();
        $("#BA4").hide();
        if (mID == 0) {
            $("#BA1").show();
            $("#BA2").show();
            $("#BA3").show();
        } else {
            $("#BA4").show();
        }
    }

</script>